#ifndef CRYPTOAGENT_H
#define CRYPTOAGENT_H

#include <QString>
#include <Note.h>

class CipherType{
public:
	enum Enum{
		AES,
		DES,
		//TEA,
		//GOST89,
		RC4,
		None
	};
};

class CryptoAgent
{
	QString _pass;
	CipherType::Enum _type;
public:
	CryptoAgent();

	void setPassword(CipherType::Enum type, QString baseStr);

	QString encrypt(QString data);
	QString decrypt(QString data);

	void encryptNote(Note* note);
	void decryptNote(Note* note);

private:

	QString encryptAES(QString data, bool encrypt);
	QString encryptDES(QString data, bool encrypt);
	QString encryptRC4(QString data, bool encrypt);
};

#endif // CRYPTOAGENT_H
